package com.cuotigou.controller;


import com.cuotigou.util.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;

/**
 * Created by Administrator on 2018/10/31.
 */
@Controller
public class UploadController {

    @RequestMapping("/upload")
    @ResponseBody
    public ObjectResult upload(XMLBean xmlBean, HttpServletRequest request, HttpServletResponse response,@RequestParam("files") MultipartFile[] files) {
//        try {
//            List<String> service = FileUtil.upload(files, "D:/image/");
//
//            return ObjectResult.build("1","成功",service);
//        }
        return null;
    }

}
